<!--
 * @Author: 朱世新
 * @Date: 2021-02-19 00:08:45
 * @LastEditors: 朱世新
 * @LastEditTime: 2021-03-01 22:40:56
 * @Description: 
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../1-call.js"></script>
</head>
<body>
  <script>
    //声明一个函数
    function add(a,b){
      console.log(this);
      return a + b + this.c;
    }

    //声明一个对象
    let obj = {
       c:521
    };

    //添加全局属性
    window.c = 1314;

    //执行call函数
    console.log(call(add,obj,10,20));
    console.log(call(add,null,30,40));
  </script>
</body>
</html>